home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinNT Logoff Roaming Profiles 1.xpl < prev    next >
Text File  |  2003-11-19  |  3KB  |  103 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "UIPATH"="Startup/Shutdown\Shutdown\Windows NT/2K/XP\10) Program Shutdown"
  5. "NAME"="Roaming Profiles Ignore Directories"
  6. "VERSION"="1.03"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="0101111"
  9. "TEXT 1"="Add..."
  10. "TEXT 2"="Remove"
  11. "DESCRIPTION 1"="If you are using "Roaming Profiles" (that is, upon logon your personal files are download from a server and on logoff uploaded again), you might want some folders not be uploaded to the server."
  12. "DESCRIPTION 2"="For example, the folder "Temporary Internet Files" is only a cache folder and it simply not very usefull to upload this to the server, especially as it can get very huge."
  13. "DESCRIPTION 3"="Simply add the folder you do NOT want to have upload in this list, given from the personal folder of the user."
  14. "DESCRIPTION 4"="For example, if the personal folder of the current user is "C:\WINNT\PROFILES\MyUser" and the folder you want to exclude is "C:\WINNT\PROFILES\MyUser\Useless Stuff", simply add "Useless Stuff"."
  15. "DESCRIPTION 5"="Please note: These settings only affect the current user."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com/"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"="Thanks to eWebLab [jerry@eWebLab.com] for the typo fix!"
  20.  
  21.  
  22. sV="HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ExcludeProfileDirs" 'STR!
  23. iCount=0
  24.  
  25. Sub Plugin_Initialize 
  26.  Call InitListbox
  27. End Sub
  28.  
  29.  
  30.  
  31.  
  32. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  33.  if ElementIndex=1 then 'ADD
  34.     s=InputWindow("Please enter the extension to unblock, e.g. <EXE>","",1)
  35.     if IsEmpty(s)=false then
  36.        if Len(s)>0 then
  37.           iCount=iCount+1
  38.           Call SetUIElement(iCount,s)
  39.           Call WriteRegistry()
  40.           Call InitListbox()              
  41.        end if
  42.     end if
  43.  
  44.  elseif ElementIndex=2 then 'REMOVE
  45.    if ElementSubIndex=0 then
  46.       Call MsgError("Please select an extension to remove")
  47.    else
  48.       Call SetUIElement(ElementSubIndex,"")
  49.       iCount=iCount-1
  50.  
  51.       Call WriteRegistry()
  52.       Call InitListbox()
  53.    end if
  54.  end if
  55.  
  56.  
  57. ' Call Logoff()
  58. End Sub
  59.  
  60.  
  61. Sub InitListbox
  62.  for i=1 to iCount
  63.      Call SetUIElement(i,"")
  64.  next
  65.  
  66.  iCount=0
  67.  
  68.  s=RegReadValue(sV)
  69.  if IsEmpty(s)=false then
  70.     'Dim ary()
  71.     ary=Split(s,";")
  72.  
  73.     for l=lBound(ary) to ubound(ary)
  74.         s=ary(l)
  75.         s=lcase(s)
  76.         if len(s)>0 then           
  77.  
  78.            iCount=iCount+1
  79.            Call SetUIElement(iCount,s)
  80.         end if
  81.     next
  82.  end if
  83.  
  84. end sub
  85.  
  86.  
  87. Sub WriteRegistry
  88.  s=""
  89.  for i=1 to iCount
  90.      s2=GetUIElement(i)
  91.      s=s & UCASE(s2) & ";"
  92.  next
  93.  
  94.  Call RegWriteValue(sV,s,1)
  95. End Sub
  96.  
  97.  
  98. Sub Plugin_Terminate 
  99. End Sub
  100.  
  101.  
  102.  
  103.